<?php
/**
* @author: Pham Van Diep
* @date: 25/2/2014
*/
$strUrlBack = isset($_SESSION[SESSION_BACKURL]) ? $_SESSION[SESSION_BACKURL] : HOST_BACKEND;
if( !isset($AppUI) || 	
    !isset($_SESSION['personal'])||
	(isset($_SESSION['personal']) &&(($_SESSION['personal']&1<<2) == 0) )//||
//    !isset($_GET['personalid'])
) {
	redirect($strUrlBack);
}
$intContractId    = intval($_GET['contractid']);
$row   = $this->contract->get($intContractId);
if($row == null) {
    	redirect($strUrlBack);
}
$this->smarty->assign('intContractId', $intContractId);
$this->smarty->assign('row', $row);
$this->smarty->assign('back', $strUrlBack);
$this->load->library('common');
$arrNational = $this->common->getCountry();
$this->load->model('league_model','league');
$arrLeague = $this->league->getAll();
$this->smarty->assign('arrLeague',$arrLeague);
$this->smarty->assign('arrNational',$arrNational);
$this->smarty->display('contract/edit.tpl');